package com.azzcs.core;

import java.util.concurrent.ThreadPoolExecutor;

/**
 * @Author: wzg
 * @Date: 2021/1/9 上午7:31
 */
public class StandardThreadExecutor implements ThreadExecutor {
    private ThreadPoolExecutor executor;
    private String name;

    public StandardThreadExecutor(ThreadPoolExecutor executor, String name) {
        this.executor = executor;
        this.name = name;
    }

    @Override
    public void execute(Runnable command) {
        executor.execute(command);
    }

    @Override
    public String getName() {
        return this.name;
    }
}
